<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">用户信息:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-user" readonly class="form-control" size="50" name="user" type="text" value="{if !empty($row.wechat)}{$row.wechat.nickname|htmlentities}{/if}">
                <input id="c-uid" readonly name="row[wechat_id]" type="hidden" value="{$row.wechat_id|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="select-user" class="btn btn-info" {if $row.wechat_id}disabled{/if}><i class="fa fa-user-plus"></i> 选择用户</button></span>

                </div>
                <span class="msg-box n-right" for="c-user"></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mobile" data-rule="required" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Id_card')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id_card" data-rule="required" class="form-control" name="row[id_card]" type="text" value="{$row.id_card|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
            <button type="button" class="btn btn-primary" data-toggle="addresspicker" data-input-id="c-address" data-lat-id="c-latitude" data-lng-id="c-longitude">点击选择地址获取经纬度</button>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-longitude" data-rule="required" class="form-control" step="0.000001" name="row[longitude]" type="number" value="{$row.longitude|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-latitude" data-rule="required" class="form-control" step="0.000001" name="row[latitude]" type="number" value="{$row.latitude|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="HH:mm" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rest_begin')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rest_begin" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[rest_begin]" type="text" value="{:$row.rest_begin?datetime($row.rest_begin):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rest_end')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rest_end" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="row[rest_end]" type="text" value="{:$row.rest_end?datetime($row.rest_end):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driving_experience')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-driving_experience" data-rule="required" class="form-control selectpicker" name="row[driving_experience]">
                {foreach name="drivingExperienceList" item="vo"}
                    <option value="{$key|htmlentities}" {in name="key" value="$row.driving_experience"}selected{/in}>{$vo|htmlentities}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Driver_license_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-driver_license_type" data-rule="required" class="form-control selectpicker" name="row[driver_license_type]">
                {foreach name="driverLicenseTypeList" item="vo"}
                    <option value="{$key|htmlentities}" {in name="key" value="$row.driver_license_type"}selected{/in}>{$vo|htmlentities}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Front_id_card')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-front_id_card" data-rule="required" class="form-control" size="50" name="row[front_id_card]" type="text" value="{$row.front_id_card|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-front_id_card" class="btn btn-danger faupload" data-input-id="c-front_id_card" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-front_id_card"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-front_id_card" class="btn btn-primary fachoose" data-input-id="c-front_id_card" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-front_id_card"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-front_id_card"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Front_vehicle_driver_license')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-front_vehicle_driver_license" data-rule="required" class="form-control" size="50" name="row[front_vehicle_driver_license]" type="text" value="{$row.front_vehicle_driver_license|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-front_vehicle_driver_license" class="btn btn-danger faupload" data-input-id="c-front_vehicle_driver_license" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-front_vehicle_driver_license"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-front_vehicle_driver_license" class="btn btn-primary fachoose" data-input-id="c-front_vehicle_driver_license" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-front_vehicle_driver_license"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-front_vehicle_driver_license"></ul>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
